package xnum

import (
	"fmt"
	"strconv"
)

// Str2int64 String 转 int64
func Str2int64(s string) int64 {
	i, err := strconv.ParseInt(s, 10, 64)
	if err != nil {
		fmt.Println("转换错误:", err)
		return 0
	}
	return i
}
func Str2float64(s string) float64 {
	i, err := strconv.ParseFloat(s, 10)
	if err != nil {
		fmt.Println("转换错误:", err)
		return 0
	}
	return i
}
